package sel.me.spring.beandefinition.samebeanname;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.ClientHttpRequestFactory;
import sel.me.spring.beandefinition.TestBean;

/**
 * @author shenenlu 2021年04月21日 下午14:26:41
 */
@Configuration
public class SameBeanNameConfig {


    @Bean
    public TestBean person(){
        TestBean personDO = new TestBean();
        personDO.setId(1);
        return personDO;
    }


    @Bean
    public TestBean person(ClientHttpRequestFactory factory){
        TestBean personDO = new TestBean();
        personDO.setId(2);
        return personDO;
    }


}
